/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Tree;

import javax.swing.Icon;

/**
 *
 * @author Alex
 */
public class IconData {
    
    /**
     * 
     */
    protected Icon _icon;
    
    protected Icon _expandedIcon;
    
    protected Object _data;
    
    /**
     *  
     * @param icon
     * @param data
     */
    public IconData(Icon icon, Object data)
    {
        _icon = icon;
        _expandedIcon = null;
        _data = data;
    }
    
    /**
     * 
     * @param icon
     * @param expandedIcon
     * @param data 
     */
    public IconData(Icon icon, Icon expandedIcon, Object data)
    {
        _icon = icon;
        _expandedIcon = expandedIcon;
        _data = data;
    }
    
    
    /**
     * 
     * @return 
     */
    public Icon getIcon()
    {
        return _icon;
    }
    
    /**
     * 
     * @return 
     */
    public Icon getExpandedIcon()
    {
        return _expandedIcon;
    }
    
    /**
     * 
     * @return 
     */
    public Object getObject()    
    {
        return _data;
    }
        
    /**
     * 
     * @return 
     */
    @Override
    public String toString()
    {
        return _data.toString();
    }
}
